package com.neusoft.neu24.nep.dao;

import com.neusoft.neu24.nep.entity.Author;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

@Repository

public interface AuthorRepository extends R2dbcRepository<Author, Integer> {

//    @Query( " " )
    public Mono<Author> findByName(String name);


    /**
     * 根据用户名获取用户信息
     *
     * @param name
     * @return
     */
    Mono<Author> findAuthorByName(@Param("name") String name);

    Flux<Author> findAll();
}
